const express = require('express');
const router = express.Router();

// predicate the router with a check and bail out when needed
router.use(function (req, res, next) {
  if (!req.headers['x-auth']) return next('router')
  next()
})

router.get('/:id', function (req, res) {
  res.send('hello, user!')
})

module.exports = {
  routerAdmin: router
}